package xiaohu.day1.HJ14;

import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            int n = Integer.parseInt(str);
            String[] strs = new String[n];
            //接收输入
            for (int i = 0; i < n; i++) {
                strs[i] = in.next();
            }
            //排序
            Arrays.stream(strs).sorted().forEach(System.out::println);
        }
    }
}
